import request from '@/utils/request'
import { FormState } from '@/views/permission/components/PermissionModel'

export function getPermissionData() {
  return request.get({ url: '/sys/permission' })
}

export function addPermissionData(params: FormState) {
  return request.post({ url: 'sys/permission', data: params })
}

export function editPermissionData(params: FormState) {
  return request.put({ url: 'sys/permission/' + params.id, data: params })
}

export function deletePermissionData(id: string) {
  return request.delete({ url: 'sys/permission/' + id })
}
